{template 'common/header'}

<link rel="stylesheet" type="text/css" href="../addons/ciyt_ms/css/home.css">
<div class="panel panel-default">
	<div class="panel-body">
		<form role="form" action="{php echo $this->createWebUrl('Home')}&method=update" method="POST">

			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						轮播图设置
					</h3>
				</div>
				<div class="panel-body" style="padding: 20px 24px;">
					<ul id="myTab" class="nav nav-tabs">
						<li class="active">
							<a href="#banner1" data-toggle="tab">轮播图1</a>
						</li>
						<li><a href="#banner2" data-toggle="tab">轮播图2</a></li>
						<li><a href="#banner3" data-toggle="tab">轮播图3</a></li>
						<li><a href="#banner4" data-toggle="tab">轮播图4</a></li>
						<li><a href="#banner5" data-toggle="tab">轮播图5</a></li>
					</ul>
				
					<div id="myTabContent" class="tab-content">
						<div class="tab-pane fade in active" id="banner1">
							<p class="pm-tips">图片尺寸建议为750X400</p>
							{php echo tpl_form_field_image('banner1');}
						</div>
						<div class="tab-pane fade" id="banner2">
							<p class="pm-tips">图片尺寸建议为750X400</p>
							{php echo tpl_form_field_image('banner2');}
						</div>
						<div class="tab-pane fade" id="banner3">
							<p class="pm-tips">图片尺寸建议为750X400</p>
							{php echo tpl_form_field_image('banner3');}
						</div>
						<div class="tab-pane fade" id="banner4">
							<p class="pm-tips">图片尺寸建议为750X400</p>
							{php echo tpl_form_field_image('banner4');}
						</div>
						<div class="tab-pane fade" id="banner5">
							<p class="pm-tips">图片尺寸建议为750X400</p>
							{php echo tpl_form_field_image('banner5');}
						</div>
					</div>
				</div>
			</div>

			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						业务介绍设置
					</h3>
				</div>
				<div class="panel-body" style="padding: 20px 24px 10px;">
					<label for="yw_title_eng">　标题-英文</label>
					<input type="text" class="form-control" id="yw_title_eng" name="yw_title_eng" placeholder="请输入名称" value="{php echo $db_rs['yw_title_eng']}">
				</div>
				<div class="panel-body" style="padding: 10px 24px;">
					<label for="yw_title_cn">　标题-中文</label>
					<input type="text" class="form-control" id="yw_title_cn" name="yw_title_cn" placeholder="请输入名称" value="{php echo $db_rs['yw_title_cn']}">
				</div>
				
				<div class="panel-body" style="padding: 10px 24px 20px;">
					<ul id="myTab" class="nav nav-tabs">
						<li class="active">
							<a href="#ywt1" data-toggle="tab">业务分类图1</a>
						</li>
						<li><a href="#ywt2" data-toggle="tab">业务分类图2</a></li>
						<li><a href="#ywt3" data-toggle="tab">业务分类图3</a></li>
						<li><a href="#ywt4" data-toggle="tab">业务分类图4</a></li>
					</ul>
				
					<div id="myTabContent" class="tab-content">
						<div class="tab-pane fade in active" id="ywt1">
							<p class="pm-tips">图片尺寸建议为352X168</p>
							{php echo tpl_form_field_image('ywt1');}
						</div>
						<div class="tab-pane fade" id="ywt2">
							<p class="pm-tips">图片尺寸建议为352X168</p>
							{php echo tpl_form_field_image('ywt2');}
						</div>
						<div class="tab-pane fade" id="ywt3">
							<p class="pm-tips">图片尺寸建议为352X168</p>
							{php echo tpl_form_field_image('ywt3');}
						</div>
						<div class="tab-pane fade" id="ywt4">
							<p class="pm-tips">图片尺寸建议为352X168</p>
							{php echo tpl_form_field_image('ywt4');}
						</div>
					</div>
				</div>
			</div>

			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						公司介绍设置
					</h3>
				</div>
				<div class="panel-body" style="padding: 20px 24px 10px;">
					<label for="gs_title_eng">　 标题-英文</label>
					<input type="text" class="form-control" id="gs_title_eng" name="gs_title_eng" placeholder="请输入名称" value="{php echo $db_rs['gs_title_eng']}">
				</div>
				<div class="panel-body" style="padding: 10px 24px 10px;">
					<label for="gs_title_cn">　标题-中文</label>
					<input type="text" class="form-control" id="gs_title_cn" name="gs_title_cn" placeholder="请输入名称" value="{php echo $db_rs['gs_title_cn']}">
				</div>
				<div class="panel-body" style="padding: 10px 24px 20px;">
					<label for="gs_title_cn">　公司介绍</label>
					<textarea name="gs_content" class="form-control" cols="68" rows="10" maxlength="588" placeholder="请输入公司介绍信息……" wrap="hard">
						{php echo $db_rs['gs_content']}
					</textarea>
				</div>
			</div>
			

			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						产品展示
					</h3>
				</div>
				
				<div class="panel-body" style="padding: 20px 24px;">
					<ul id="myTab" class="nav nav-tabs">
						<li class="active">
							<a href="#item_pic1" data-toggle="tab">产品1</a>
						</li>
						<li><a href="#item_pic2" data-toggle="tab">产品2</a></li>
						<li><a href="#item_pic3" data-toggle="tab">产品3</a></li>
						<li><a href="#item_pic4" data-toggle="tab">产品4</a></li>
						<li><a href="#item_pic5" data-toggle="tab">产品5</a></li>
					</ul>
				
					<div id="myTabContent" class="tab-content">
						<div class="tab-pane fade in active" id="item_pic1">
							<label for="item_text1">　产品名称</label>
							<input type="text" class="form-control" id="item_text1" name="item_text1" placeholder="请输入名称" style="margin-bottom:12px;" value="{php echo $db_rs['item_text1']}">
							<p class="pm-tips">图片尺寸建议为258X258</p>
							{php echo tpl_form_field_image('item_pic1');}
						</div>
						<div class="tab-pane fade" id="item_pic2">
							<label for="item_text2">　产品名称</label>
							<input type="text" class="form-control" id="item_text2" name="item_text2" placeholder="请输入名称" style="margin-bottom:12px;" value="{php echo $db_rs['item_text2']}">
							<p class="pm-tips">图片尺寸建议为258X258</p>
							{php echo tpl_form_field_image('item_pic2');}
						</div>
						<div class="tab-pane fade" id="item_pic3">
							<label for="item_text3">　产品名称</label>
							<input type="text" class="form-control" id="item_text3" name="item_text3" placeholder="请输入名称" style="margin-bottom:12px;" value="{php echo $db_rs['item_text3']}">
							<p class="pm-tips">图片尺寸建议为258X258</p>
							{php echo tpl_form_field_image('item_pic3');}
						</div>
						<div class="tab-pane fade" id="item_pic4">
							<label for="item_text4">　产品名称</label>
							<input type="text" class="form-control" id="item_text4" name="item_text4" placeholder="请输入名称" style="margin-bottom:12px;" value="{php echo $db_rs['item_text4']}">
							<p class="pm-tips">图片尺寸建议为258X258</p>
							{php echo tpl_form_field_image('item_pic4');}
						</div>
						<div class="tab-pane fade" id="item_pic5">
							<label for="item_text5">　产品名称</label>
							<input type="text" class="form-control" id="item_text5" name="item_text5" placeholder="请输入名称" style="margin-bottom:12px;" value="{php echo $db_rs['item_text5']}">
							<p class="pm-tips">图片尺寸建议为258X258</p>
							{php echo tpl_form_field_image('item_pic5');}
						</div>
					</div>
				</div>
			</div>


			<button type="submit" class="btn btn-default">提交</button>
		</form>
	</div>
</div>



<script>


	var db_jrs = ['banner1','banner2','banner3','banner4','banner5','ywt1','ywt2','ywt3','ywt4','item_pic1','item_pic2','item_pic3','item_pic4','item_pic5'];

	if ("{$db_rs['banner1']}") {$("[name='banner1']").val("{$db_rs['banner1']}")};
	if ("{$db_rs['banner2']}") {$("[name='banner2']").val("{$db_rs['banner2']}")};
	if ("{$db_rs['banner3']}") {$("[name='banner3']").val("{$db_rs['banner3']}")};
	if ("{$db_rs['banner4']}") {$("[name='banner4']").val("{$db_rs['banner4']}")};
	if ("{$db_rs['banner5']}") {$("[name='banner5']").val("{$db_rs['banner5']}")};
	if ("{$db_rs['ywt1']}") {$("[name='ywt1']").val("{$db_rs['ywt1']}")};
	if ("{$db_rs['ywt2']}") {$("[name='ywt2']").val("{$db_rs['ywt2']}")};
	if ("{$db_rs['ywt3']}") {$("[name='ywt3']").val("{$db_rs['ywt3']}")};
	if ("{$db_rs['ywt4']}") {$("[name='ywt4']").val("{$db_rs['ywt4']}")};
	if ("{$db_rs['item_pic1']}") {$("[name='item_pic1']").val("{$db_rs['item_pic1']}")};
	if ("{$db_rs['item_pic2']}") {$("[name='item_pic2']").val("{$db_rs['item_pic2']}")};
	if ("{$db_rs['item_pic3']}") {$("[name='item_pic3']").val("{$db_rs['item_pic3']}")};
	if ("{$db_rs['item_pic4']}") {$("[name='item_pic4']").val("{$db_rs['item_pic4']}")};
	if ("{$db_rs['item_pic5']}") {$("[name='item_pic5']").val("{$db_rs['item_pic5']}")};


	var myArray=new Array();
	$.each(db_jrs,function(index,value){
		var name = '[name="' + value + '"]';
		var id = '[id="' + value + '"]';
		$(id).find("img").attr("src","{$_W['attachurl_local']}"+$(name).val());
	});


</script>



{template 'common/footer'}
